package com.itheima.service;

import com.itheima.domain.Book;

import java.util.List;

/**
 * className: BookService
 * description:
 * date: 2023/3/9 0009-PM 11:10:32
 * <p>
 * project: springboot
 * package: com.itheima.service
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
public interface BookService {

    /**
     * 保存
     *
     * @param book {@link Book}
     * @return {@link Boolean}
     */
    boolean save(Book book);

    /**
     * 根据 id 获取
     *
     * @param id {@link Integer}
     * @return {@link Book}
     */
    Book getById(Integer id);

    /**
     * 更新
     *
     * @param book {@link Book}
     * @return {@link Boolean}
     */
    boolean update(Book book);

    /**
     * 根据 id 删除
     *
     * @param id {@link Integer}
     * @return {@link Boolean}
     */
    boolean delete(Integer id);

    /**
     * 查询所有
     *
     * @return {@link List<Book>}
     */
    List<Book> getAll();
}
